#include <QtGui/QApplication>
#include "widget.h"
#include "driver.h"
#include "engine.h"
#include "buffer.h"
#include "port.h"
#include "qkeymetro.h"

int main(int argc, char *argv[])
{
    QApplication application(argc, argv);


    Engine engine;
    Driver driver(&Engine::setBufSize, &Engine::setSampleRate);
    engine.setWaitCondition(driver.getWaitCondition());

    driver.connectPorts(engine.getPort(true), engine.getPort(false));

    Widget widget;
    widget.connectSignals(&engine);
    widget.show();


    driver.start();
    engine.start();

    return application.exec();
}
